/**
 * 文件名称:ChipmodelDaoImpl.java
 * 文件版权:ChinaParasol Technologies Co., Ltd. Copyright 1998-2020, All rights reserved
 * 文件描述:<描述>
 * 修改作者:LiXiangDong
 * 修改时间:Jan 7, 2013
 */
package com.parasol.hcerp.service.chipmodel.dao.impl;

import java.util.List;

import com.parasol.hcerp.common.jdbc.ParasolProSuport;
import com.parasol.hcerp.common.jdbc.ParasolSQLSuport;
import com.parasol.hcerp.service.chipmodel.dao.ChipmodelDao;
import com.parasol.hcerp.service.chipmodel.domain.ChipmodelBean;

/**
 * 
 * @author  LiXiangDong
 * @version V1.0
 */
public class ChipmodelDaoImpl implements ChipmodelDao
{
    
    private ParasolSQLSuport parasolSQLSuport = null;
    
    private ParasolProSuport parasolProSuport = null;
    
    public ParasolSQLSuport getParasolSQLSuport()
    {
        return parasolSQLSuport;
    }

    public void setParasolSQLSuport(ParasolSQLSuport parasolSQLSuport)
    {
        this.parasolSQLSuport = parasolSQLSuport;
    }

    public ParasolProSuport getParasolProSuport()
    {
        return parasolProSuport;
    }

    public void setParasolProSuport(ParasolProSuport parasolProSuport)
    {
        this.parasolProSuport = parasolProSuport;
    }

    public void deleteForChipmodel(String chipmodelid)
    {
        parasolSQLSuport.delete("chipmodel.deleteForChipmodel", chipmodelid);
    }
    
    public ChipmodelBean queryForChipmodel(String chipmodelid)
    {
        return (ChipmodelBean)parasolSQLSuport.queryForObject("chipmodel.queryForChipmodel", chipmodelid);
    }
    
    public int queryForExist(ChipmodelBean chipmodelBean)
    {
        String result = String.valueOf(parasolSQLSuport.queryForObject("chipmodel.queryForExist", chipmodelBean));
        return Integer.parseInt(result);
    }
    
    @SuppressWarnings("unchecked")
    public List<ChipmodelBean> queryForList()
    {
        return (List<ChipmodelBean>)parasolSQLSuport.queryForList("chipmodel.queryForList");
    }
    
    public void saveForChipmodel(ChipmodelBean chipmodelBean)
    {
        parasolSQLSuport.insert("chipmodel.saveForChipmodel", chipmodelBean);
    }
    
    public void updateForChipmodel(ChipmodelBean chipmodelBean)
    {
        parasolSQLSuport.update("chipmodel.updateForChipmodel", chipmodelBean);
    }

    public int queryForUse(String chipmodelid)
    {
        String result = String.valueOf(parasolSQLSuport.queryForObject("chipmodel.queryForUse", chipmodelid));
        return Integer.parseInt(result);
    }
    
}
